// 账号信息的ts类型
export interface ResponseData {
    code: number,
    ok: boolean,
    message: string
}

// 一个账号的ts信息
export interface User {
    id?: number,
    username?: string,
    password?: string,
    name?: string,
    createTime?: string,
    updateTime?: string,
    phone?: string | null | number,
    roleName?: string
}

// 包含全部信息的数组
export type Records = User[]

// 获取全部信息接口返回的数据
export interface UserResponseData extends ResponseData {
    data: {
        records: Records,
        total: number,
        size: number,
        current: number,
        orders?: [],
        optimizeCountSql: boolean,
        hitCount: boolean,
        countId: null | number,
        maxLimit: null | number,
        searchCount: boolean,
        pages: number
    }
}
// 代表一个职位的ts类型
export interface RoleData {
    "id"?: number,
    "createTime"?: string,
    "updateTime"?: string,
    "roleName"?: string,
    "remark"?: null
}
// 所有的职位列表
export type AllRole = RoleData[]
// 获取全部职位列表接口返回的数据
export interface AllRoleResponseData extends ResponseData {
    data: {
        assignRoles: AllRole,
        allRolesList: AllRole
    }
}

// 给用户添加角色的ts类型
export interface SetRoleData {
    userId: number,
    roleIdList: number[]
}